package hello.java.app2;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class CallStatus {
    public String phoneId;
    public String number;
    public String userName;
    public Object phoneOwner;
    public int queueSecond;
    public boolean isHold;
    public boolean isEmergency;
    public boolean isSplitted;

    static ObjectMapper objectMapper = new ObjectMapper();

    @Override
    public String toString() {
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
            return "queue number:" + number + ";";
        }
    }
}
